package highj;

public class Computer {
public Computer(String name,CPU cpu,Memory memory,Disk disk,Mainboard mainboard){
Name=name;
mycpu=cpu;
mymemory=memory;
mydisk=disk;
mymainboard=mainboard;
price=mycpu.getPrice()+mymemory.getPrice()+mydisk.getPrice()+mymainboard.getPrice();
}
public void description() {
	System.out.println("computer name:"+Name);
	System.out.println("this computer contains:"+mycpu.getName()+" "+
	mymemory.getName()+" "+mydisk.getName()+" "+mymainboard.getName()+" ");
	System.out.println("the cost of this computer is:"+price);
}
public CPU mycpu;
public Memory mymemory;
public Disk mydisk;
public Mainboard mymainboard;
public String Name;
public int price;

}
